#include <iostream>
#include <SFML/Graphics.hpp>
#include "../include/Engine.hpp"

Engine::Engine(sf::RenderWindow &App) : m_app(App), m_graphic(NULL)
{
    m_event = NULL;
}
Engine::Engine(sf::RenderWindow &App, GraphicEngine *graphic, Configs *config) : m_app(App), m_graphic(graphic), m_configs(config)
{
    m_event = NULL;
}

void Engine::SetGraphicEngine(GraphicEngine *graphic)
{
    m_graphic = graphic;
}
void Engine::SetConfigsEngine(Configs *config)
{
    m_configs = config;
}

sf::Event* Engine::Event()
{
    return m_event;
}

bool Engine::GetEvent(sf::Event& event)
{
    m_event = &event;
    return m_app.GetEvent(event);
}
GraphicEngine* Engine::Graphic() const
{
    return m_graphic;
}
Configs* Engine::Config()
{
    return m_configs;
}

sf::RenderWindow& Engine::App()
{
    return m_app;
}
